

class chat extends user {

public $message;
  
 public function Send($student_id,$message)
 { 
    $sqll= "INSERT INTO project.chat(student_ID,message)  VALUES('$student_id','$message')";
    $query1= mysql_query($sqll) or die ('does not inserted') ;
    
 }
 public function recieve()
 {
 
 $reQuery = mysql_query("SELECT * FROM project.chat");
 $numrows=mysql_num_rows($reQuery);
  if($numrows!=0 ){
      while($row =mysql_fetch_assoc($reQuery)){
	    $mail=$row['message'];
	    $ID=$row['student_ID'];
		echo "From ::   $ID <br> message ::    $mail  ";
		echo"<br>";
		
  	     }
  
 
  }
 
 }
}
?>